package com.mock.water.modules.system.user.service;


import com.mock.water.modules.system.user.entity.UserEntity;
import com.baomidou.mybatisplus.extension.service.IService;
import org.springframework.cache.annotation.CacheConfig;

import java.util.List;

/**
* @author dell
* @description 针对表【sys_user】的数据库操作Service
* @createDate 2022-10-13 16:45:15
*/

public interface UserService extends IService<UserEntity> {

    /**
     * 使用缓存
     *
     * @param cacheKey 缓存键
     * @return {@link UserEntity}
     */
    List<UserEntity> findAllCache(String cacheKey);

    /**
     * 使用缓存
     *
     * @param username 缓存键
     * @return {@link UserEntity}
     */
    UserEntity queryUserByUsername(String username);

    /**
     * 更新缓存
     *
     * @param cacheKey 缓存键
     * @return {@link UserEntity}
     */
    UserEntity updateCache(String cacheKey);


    /**
     * 删除缓存
     *
     * @param cacheKey 缓存键
     * @return {@link UserEntity}
     */
    boolean deleteCache(String cacheKey);

}
